<!-- 下拉刷新 -->
<ion-refresher slot="fixed" (ionRefresh)="doRefresh($event)">
  <ion-refresher-content pullingIcon="arrow-dropdown" pullingText="下拉刷新" refreshingSpinner=undefined>
  </ion-refresher-content>
</ion-refresher>

<div class="customer-box" id="customer_details_hid">
  <div *ngIf="checkBgPre" class="bg-box bg-box1">
    <img class="bg-box-img" src="assets/img/customer_details_bg@3x.png" />
    <div class="bg-box-div">释放查看上一个客户</div>
  </div>

  <!-- 卡片 -->
  <div class="card-box" [style.marginBottom]="!tagData?.data?.recommen ? '1.81rem' : '1.19rem'">
    <div *ngIf="tagData?.data?.customInfo?.certification=='认证'" class="certification">认证</div>
    <img class="card-title-s5" *ngIf="tagData?.data?.customInfo?.signed && tagData?.data?.customInfo?.signed=='成功签约'"
      src="assets/img/customer_details_success@3x.png" />
    <!-- 标题 -->
    <div class="card-title">
      <span class="card-title-s1">{{tagData?.data?.customInfo?.name}}</span>
      <span class="tag card-title-s2"
        *ngIf="tagData?.data?.customInfo?.pluginId">{{tagData?.data?.customInfo?.pluginId}}</span>
      <span *ngIf="tagData?.data?.customInfo?.signed && tagData?.data?.customInfo?.signed=='跟进中'"
        class="card-title-s3 tag">{{tagData?.data?.customInfo?.signed}}</span>
      <span *ngIf="tagData?.data?.customInfo?.signed && tagData?.data?.customInfo?.signed=='无意向'"
        class="card-title-s4 tag">{{tagData?.data?.customInfo?.signed}}</span>
    </div>
    <div class="card-tagname">{{tagData?.data?.customInfo?.tagname}}</div>
    <!-- tag -->
    <div class="card-tag-list">
      <span class="tag" *ngFor="let tags of tagData?.data?.customInfo?.skill?.split('，').join(',').split(',')"
        [innerHTML]="tags"></span>
    </div>
    <!-- 按钮 -->
    <div *ngIf="tagData?.data?.customInfo?.unSignOper">
      <div class="card-btn" appDebounceClick (debounceClick)="clickLink(tagData?.data?.customInfo?.unSignOper?.link)">
        {{tagData?.data?.customInfo?.unSignOper?.label}}</div>
      <div class="card-unsign-tx">{{tagData?.data?.customInfo?.unSignOper?.tagLabel}}</div>
    </div>
    <div *ngIf="tagData?.data?.customInfo?.signedOper" appDebounceClick (debounceClick)="clickLink(tagData?.data?.customInfo?.signedOper?.link)">
      <div class="card-sign-tx">
        {{tagData?.data?.customInfo?.signedOper?.label}}
        <img src="assets/img/arrow_right.png" />
      </div>
    </div>
  </div>

  <!-- 推荐 -->
  <div class="recommen" *ngIf="tagData?.data?.recommen">
    <img [src]="tagData?.data?.recommen?.label" />
    <div>{{tagData?.data?.recommen?.content}}</div>
  </div>

  <!-- 商机信息 -->
  <div class="info-box">
    <div class="info-title">{{tagData?.data?.opportunity?.title}}</div>
    <!-- 信息 -->
    <div class="contract-row" *ngFor="let info of tagData?.data?.opportunity?.items">
      <div class="contract-label" [innerHTML]="info?.label"></div>
      <div class="inlinebox marginl163" [innerHTML]="info?.content"></div>
      <div *ngIf="info?.small" class="tag info-more" [innerHTML]="info?.small"></div>
    </div>
    <!-- 描述 -->
    <div class="info-describe" *ngIf="tagData?.data?.opportunity?.describe">
      <div [innerHTML]="tagData?.data?.opportunity?.describe?.title"></div>
      <div [ngClass]="{'info-add': !infoAll}" class="info-tx" [innerHTML]="tagData?.data?.opportunity?.describe?.content"></div>
      <span *ngIf="!infoAll" class="ellip">...</span>
      <div *ngIf="tagData?.data?.opportunity?.describe?.content && tagData?.data?.opportunity?.describe?.content.length > 85 && infoAll" appDebounceClick (debounceClick)="clickInfoAll()" class="info-all">查看全部</div>
      <div *ngIf="tagData?.data?.opportunity?.describe?.content && tagData?.data?.opportunity?.describe?.content.length > 85 && !infoAll" appDebounceClick (debounceClick)="clickInfoAll()" class="info-all">收起全部</div>
    </div>
  </div>

  <!-- 客户标记 -->
<!--   <div class="tag-box">
    <div class="info-title" [innerHTML]="tagData?.data?.labelTag?.title"></div>
    <div>
      <div *ngFor="let tagtag of tagParent" class="tag-tag" [ngClass]="{'active': tagtag?.check == true}"
        appDebounceClick (debounceClick)="clickTag(tagtag)" [innerHTML]="tagtag?.name"></div>
    </div>
    <div *ngIf="tagChild && tagChild !== 0">
      <div *ngFor="let tagtag2 of tagChild" class="tag-tag" [ngClass]="{'active': tagtag2?.check == true}"
        appDebounceClick (debounceClick)="clickTag(tagtag2)" [innerHTML]="tagtag2?.name"></div>
    </div>
    <div *ngIf="tagGrandson && tagGrandson !== 0">
      <div *ngFor="let tagtag3 of tagGrandson" class="tag-tag" [ngClass]="{'active': tagtag3?.check == true}"
        appDebounceClick (debounceClick)="clickTag(tagtag3)" [innerHTML]="tagtag3?.name"></div>
    </div>
  </div> -->
  <div class="tag-box">
    <div class="info-title" [innerHTML]="tagData?.data?.labelTag?.title"></div>
    <div>
      <div *ngFor="let tagtag of tagParent" class="tag-tag" [ngClass]="{'active': tagtag?.check == true}"
        appDebounceClick (debounceClick)="clickTag(tagtag, 1)" [innerHTML]="tagtag?.name"></div>
    </div>
    <div *ngIf="tagChild && tagChild !== 0">
      <div *ngFor="let tagtag2 of tagChild" class="tag-tag" [ngClass]="{'active': tagtag2?.check == true}"
        appDebounceClick (debounceClick)="clickTag(tagtag2, 2)" [innerHTML]="tagtag2?.name"></div>
    </div>
    <div *ngIf="tagGrandson && tagGrandson !== 0">
      <div *ngFor="let tagtag3 of tagGrandson" class="tag-tag" [ngClass]="{'active': tagtag3?.check == true}"
        appDebounceClick (debounceClick)="clickTag(tagtag3, 3)" [innerHTML]="tagtag3?.name"></div>
    </div>
  </div>
  <!-- 备注 -->
  <div class="remark-box">
    <div class="remark-btn" appDebounceClick (debounceClick)="addRemark()">添加</div>
    <ion-textarea class="remark-txarea" [(ngModel)]="remarksText"
      [placeholder]="tagData?.data?.customRemark?.label"></ion-textarea>
    <!-- 记录 -->
    <div>
      <div class="record-title" [innerHTML]="tagData?.data?.remark?.title"></div>
      <div *ngIf="!tagData?.data?.remark.item || tagData?.data?.remark.item.length == 0" class="record-no-tx">暂无记录</div>
      <ng-container *ngIf="remarksList && remarksList.length !== 0">
        <div class="record-list" *ngFor="let rem of remarksList">
          <div class="record-tx1">{{rem.datetime}}</div>
          <div class="record-tx2">{{rem.content}}</div>
        </div>
      </ng-container>

    </div>
  </div>
  <!-- 上拉触件 -->
  <div class="gesture" id="gestureBox"></div>

  <div class="bg-box bg-box2" id="checkBgNext">
    <img class="bg-box-img" src="assets/img/customer_details_bglast@3x.png" />
    <div class="bg-box-div">释放查看下一个客户</div>
  </div>



  
  
  <!-- 向上滚动刷新 -->
  <!-- <ion-infinite-scroll id="customer_details_scroll_id" (ionInfinite)="loadMoreData($event)" style="display: none;" threshold="10%">
    <ion-infinite-scroll-content loadingSpinner="bubbles" loadingText="Loading more data...">
    </ion-infinite-scroll-content>
  </ion-infinite-scroll>  -->

</div>